const { Category } = require('../../model/Category');
module.exports = async (req,res)=>{
  await Category.findByIdAndUpdate(req.body._id,{
    title: req.body.title,
    createTime: Date.now()
  });
  res.redirect('/admin/categories');
}